package com.shujia.flink.table

import org.apache.flink.table.functions.ScalarFunction
/**
 * 编写flink自定义函数：继承ScalarFunction类
 */
class Demo4SubstringFunction extends ScalarFunction {

  def eval(str: String, benin: Int, end: Int): String = {
    //截取字符串
    val nreStr: String = str.substring(benin, end)

    //返回新的字符串
    nreStr
  }
}
